from django.conf import settings

from EE.models import Island

from django.contrib.auth.models import User

def createNew(reference_state, new_cost, new_capacity, new_efficiency):
  island = Island(state=reference_state, cost=new_cost, capacity=new_capacity, efficiency=new_efficiency, currentContent=0)
  island.save()
  return island
  
def getIsland(reference_state):
  island = Island.objects.filter(state=reference_state).get()
  return island